<?php
error_reporting(0);
include_once '../classes/Authentication.php';
include_once '../classes/HTML.php';
session_start ();
$auth = new Authentication ();
$auth->checkAuthentication ($_SERVER['PHP_SELF'], 2);
HTML::createHeader('Tickets bearbeiten', '');
$db = new DB_For_User();
?>
<body>
	<?php HTML::createLogobar($auth->getUser());?>
	<div class="container">
		<div class="row">
			<div class="col-md-3">
				<h3>Tickets bearbeiten</h3>   
          		<p>Hier k&ouml;nnen Sie weitere Tickets bearbeiten:</p>
          		<p><a class="btn btn-default" href="tickets_edit.php" role="button">Tickets bearbeiten &raquo;</a></p>
			</div>
			<div class="col-md-4">
				<h2>Ticket beantworten</h2>
				<table class="table table-hover table-condensed">
				<tr>
					<th>Titel</th>
					<th>Kategorie</th>
					<th>Priotit&auml;t</th>
					<th>Status</th>
				</tr>
				<?php
					$tickets = $db->getTicketById($_GET('id'));
					foreach($tickets as $ticket) {
						echo $ticket->getTicketHtmlTable();
					}
				?>
				</table>
			</div>
		</div>
		<?php HTML::createFooter();?>
	</div>
	<?php HTML::includeJS();?>
</body>
</html>